#pragma once
#include <iostream>
using namespace std;
namespace hcc
{
    template <class Iterator , class ref , class ptr>
    struct list_riterator
    {
        typedef list_riterator<Iterator , ref , ptr> riterator;
        Iterator it;
        list_riterator(Iterator _i)
            :it(_i)
        {}
        riterator operator++()
        {
            --it;
            return *this;
        }
        riterator operator++(int)
        {
            riterator tem(*this);
            --it;
            return tem;
        }
        ref operator*()
        {
            Iterator tem(it);
            return *++tem;
        }
        riterator operator--()
        {
            it++;
            return *this; 
        }
        riterator operator--(int)
        {
            riterator tem(it);
            ++it;
            return tem;
        }
        bool operator!=(const riterator& t)
        {
            return it!=t.it;
        }
    };
}